'''
Description: Launch file for the robot chassis node in ROS 2.
Version: V1.0
Author: zw_1520@163.com
Date: 2025-08-16 09:48:17
LastEditors: zw_1520@163.com
LastEditTime: 2025-08-16 09:52:07
Copyright (C) 2024-2050 Lens All rights reserved.
'''

from launch import LaunchDescription
from launch_ros.actions import Node
from ament_index_python.packages import get_package_share_directory
import os


def generate_launch_description():
    package_path = get_package_share_directory('robot_chassis')

    launch_description = LaunchDescription()

    config = os.path.join(package_path, "config", "chassis_config.yaml")

    robot_chassis_node = Node(
        package='robot_chassis',
        executable='robot_chassis_node',
        name='robot_chassis',
        parameters=[config]
    )

    launch_description.add_action(robot_chassis_node)

    return launch_description
